class User {
  int? id;
  String? nickname;
  String? avatar;
  String? usercode;
  String? deptcode;

  User({this.id, this.nickname, this.avatar, this.usercode, this.deptcode});

  factory User.fromJson(Map<String, dynamic> json) => User(
        id: json['id'] as int?,
        nickname: json['nickname'] as String?,
        avatar: json['avatar'] as String?,
        usercode: json['usercode'] as String?,
        deptcode: json['deptcode'] as String?,
      );

  Map<String, dynamic> toJson() => {
        'id': id,
        'nickname': nickname,
        'avatar': avatar,
        'usercode': usercode,
        'deptcode': deptcode,
      };
}
